package com.lee.treasure.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Lee
 * @date 2020/7/27
 */
@RestController
@RequestMapping("test")
public class TestController {

    @GetMapping("t1")
    public int test1() {
        return 1;
    }


    @PreAuthorize("hasAuthority('aa:bb:cd')")
    @GetMapping("t2")
    public int test2() {
        return 2;
    }

}
